A virtual machine (VM) typically includes an image and a disk. In cloud platforms, (VM) images are commonly stored on local disks of a physical server. Additionally, VM disks can be stored on a storage area network (SAN). When a VM provisioning request arrives, the image needs to be copied onto the local disk of the physical server before starting the VM. If the image already exists, the VM can be started on the physical server. But if no physical server having the image has the capacity to run the VM, the image needs to be copied to a new physical server, which increases the provisioning time. Accordingly, images need to be available on a physical server before the relevant VM can be started on that physical server. Also, the physical server or physical machine (PM) must have the capacity to launch a VM from its available images.
Each physical server local disk has limited storage capacity. If care is taken not to assign VM images to a particular physical server, that physical server may run under capacity. For example, a physical server local disk can only store ten images, but can run 30 VMs. If only ten VMs from ten distinct images are running on this physical server, and no more requests for those VMs arrive, then the physical server capacity of running 20 VMs is wasted.
Existing approaches for managing such components include storing VM images on remote disks and storing VM disks on local disks of a physical server. Such approaches, however, have several disadvantages. For instance, a complex solution is needed to stream VM images to disks, and such approaches provide no guarantee of running VMs of the same type on the same physical server.
Accordingly, a need exists for maximizing virtual machine-to-image affinity on a physical server.